package org.internna.ossmoney.services;

import java.util.Date;
import java.util.Locale;
import java.math.BigDecimal;
import org.internna.ossmoney.model.Bill;
import org.internna.ossmoney.model.Account;
import org.internna.ossmoney.model.Subcategory;
import org.internna.ossmoney.model.support.Interval;
import org.internna.ossmoney.model.AccountTransaction;
import org.internna.ossmoney.model.security.UserDetails;

public interface AccountService {

    void createAccount(Account account);
    long addTransaction(AccountTransaction transaction);

    /**
     * Pay a configured bill.
     *
     * @param bill a non null instance
     * @param origin any
     * @param amount any
     * @param operationDate any
     */
    void payBill(UserDetails user, Bill bill, Long origin, Double amount, Date operationDate);
    BigDecimal getExpenses(UserDetails user, Locale locale, Subcategory category, Interval interval);

    /**
     * Pay a credit card bill.
     *
     * @param user the current user
     * @param account credit card account
     * @param origin origin of the funds
     * @param date operation date
     * @param transactions transactions being payed
     */
    void balance(UserDetails user, Account account, Account origin, Date date, String[] transactions);
    void transferMoney(Long origin, Long target, Date operationDate, BigDecimal amount, BigDecimal chargeAmount, double rate, String memo);
    

}
